/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.mldn.demo.astract;

/**
 *
 * @author Administrator
 */
public class Abstract01 {
    public static void main(String[] args) {
        new B();
    }
}

abstract class A{
    public static final String FLAG = "CHINA";
    private String name="lxh";

    public A() {
        System.out.println("A, gen");
    }

    
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
    public abstract void print();
}

class B extends A{

    public B() {
        System.out.println("B, gen");
    }

    
    @Override
    public void print() {
        System.out.println("FLAG="+FLAG);
        System.out.println("name = "+getName());
    }
    
}